package com.itheima.controller;

/**
 * @author Xiao
 * @date 2021/9/16
 */
public class Result {
    private Integer code;   //描述统一格式中的数据
    private Object data;    //描述统一格式中的编码，用于区分操作，可以简化配置0或1表示成功失败
    private String msg; //描述统一格式中的消息，可选属性

    public Result() {
    }
    public Result(Integer code, Object data) {
        this.code = code;
        this.data = data;
    }
    public Result(Integer code, Object data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }
    public void setData(Object data) {
        this.data = data;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
